package com.yql.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.yql.dao.OrderDao;
import com.yql.entity.Order;
import com.yql.entity.OrderVO;
import com.yql.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class OrderServiceImpl implements OrderService {
    @Autowired
    OrderDao orderDao;
    @Override
    public PageInfo<Order> listOrder(OrderVO vo,Integer pageNum,Integer pageSize) {
        PageHelper.startPage(pageNum,pageSize);
        List<Order> list = orderDao.listOrder(vo);
        return new PageInfo<>(list);
    }
}
